<?php

namespace Common\Model;

use Think\Model;

class ConfigModel extends Model {
    public static function newSelf()
    {
        return new self();
    }
    public function findOneById($id)
    {
        return $this->where(['id'=>$id])->find();
    }

    public function getInfo()
    {
        $info=$this->where()->select();
        foreach ($info as $k=>$v)
        {
            $infos[$v['key']]=$v['value'];
        }
        return $infos;
    }
}